﻿using System;

using Sustainalytics.Entities.ESGRatings;

using Xunit;

namespace Sustainalytics.ESGRatings.BusinessLogic.Tests
{
    public class EsgCustomPdfGeneratorTest
    {
        private IPdfReportExecutor _reportExecutor = new PdfReportExecutor(
            "mongodb://localhost:27017/ClientDW_A", 
            "mongodb://localhost:27017/ClientPlatform", 
            "mongodb://localhost:27017/DWArchive_A", 
            "http://localhost:10280/esgcomputingserv/api/v1");

        private Guid companyId = new Guid("6c6845ff-4d9e-4f4d-b920-962af834ef0a");

        private Guid matrixId = new Guid("290a624d-a1bf-4298-b91d-2456223923d5");

        private Guid referenceUniverseId = new Guid("ac0c614b-4764-4902-a4e1-ab5af758dd8b");

        [Fact]
        public void PdfExecutionTestMethod()
        {
            var parameters = new EsgCompanyReportParameters
                                 {
                                     CompanyId = companyId, 
                                     AccountId =
                                         new Guid("528ea769-2d17-e411-92ce-6c3be5be9f98"), 
                                     EsgProfileId =
                                         new Guid("1ee42081-3ba5-438d-99f2-8fa960d56184"), 
                                     MatrixId = matrixId, 
                                     ReferenceUniverseId = referenceUniverseId, 
                                     AccountTier = 1, 
                                     ComparativeGroup = 0, 
                                     CompanyType = 2, 
                                     TemplateType = 2, 
                                     UriComputing =
                                         new Uri(
                                         "http://localhost:10280/esgcomputingserv/api/v1")
                                 };

            _reportExecutor.ExecuteEsgCompanyReport(parameters);
        }
    }
}